package com.iu.eblood.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the EVENTTASK database table.
 * 
 */
@Embeddable
public class EventtaskPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long eventid;
	private int taskid;

    public EventtaskPK() {
    }

	public long getEventid() {
		return this.eventid;
	}
	public void setEventid(long eventid) {
		this.eventid = eventid;
	}

	public int getTaskid() {
		return this.taskid;
	}
	public void setTaskid(int taskid) {
		this.taskid = taskid;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof EventtaskPK)) {
			return false;
		}
		EventtaskPK castOther = (EventtaskPK)other;
		return 
			(this.eventid == castOther.eventid)
			&& (this.taskid == castOther.taskid);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.eventid ^ (this.eventid >>> 32)));
		hash = hash * prime + this.taskid;
		
		return hash;
    }
}